namespace CodeConsult.Nordic.nRF8001.ApplicationControlInterface.Commands.SystemCommands
{
    public class SetApplLatencyCommand : AciCommandBase
    {
        public const byte OpCode = 0x19;

        public byte ApplLatencyMode { get; set; }
        public ushort Latency { get; set; }

        protected override void EncodeBuffer()
        {
            EncodeBufferWithCommandHeader(OpCode, 3);
            EncodeHelper.SetByte(ApplLatencyMode);
            EncodeHelper.SetUnsignedShort(Latency, EncodeHelper.ByteOrder.LsbMsb);
        }
    }
}
